package com.hlk.hlk_blog.dao;

import com.hlk.hlk_blog.entity.Comment;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CommentMapper {
    List<Comment> findByBlogId(Long blogId);

    List<Comment> findByBlogIdAndParentIdNull(Long blogId);

    List<Comment> findByBlogIdAndParentIdNotNull(@Param("blogId") Long blogId, @Param("parentId") Long parentId);

    Comment findById(Long id);

    Integer insertComment(Comment comment);


}